<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<NexCart.Web.Models.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	NexCart > Products
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		Products</h2>
	<table>
		<tr>
			<th>
			</th>
			<th>
				Name
			</th>
			<th>
				Description
			</th>
			<th>
				Price
			</th>
			<th>
				Shipping Cost per Item
			</th>
			<th>
				Weight
			</th>
			<th>
				Active
			</th>
			<th></th>
		</tr>
		<% foreach (var item in Model) { %>
		<tr>
			<td>
				<%= Html.ActionLink("Edit", "Edit", new { id=item.Id }) %>
				|
				<%= Html.ActionLink("Delete", "Delete", new { id = item.Id })%>
				|
				<%= Html.ActionLink("Details", "Details", new { id=item.Id })%>
			</td>
			<td>
				<%= Html.Encode(item.Name) %>
			</td>
			<td>
				<%= Html.Encode(item.Description) %>
			</td>
			<td>
				<%= Html.Encode(String.Format("{0:F}", item.Price)) %>
			</td>
			<td>
				<%= Html.Encode(String.Format("{0:F}", item.ShippingCostPerItem)) %>
			</td>
			<td>
				<%= Html.Encode(String.Format("{0:F}", item.Weight)) %>
			</td>
			<td>
				<%= Html.Encode(item.Active) %>
			</td>
			<td>Product Image Gallery ></td>
		</tr>
		<% } %>
	</table>
	<p>
		<%= Html.ActionLink("Create New", "Create") %>
	</p>
</asp:Content>
